package zi.fu.fan.zhuan;

import org.junit.Test;

/**
 * Created by Admin on 1/5 0005.
 */
public class UpLowTest {
    @Test
    public void test(){

    }


}

class MethodTest{
    public static void main(String[] args) {
        String s1="qwerWWW";
        String s2="QWERwww";
        MethodTest m=new MethodTest();
        boolean b=m.equalsIgnoreCase(s1,s2);
        System.out.println(b);

    }
      boolean equalsIgnoreCase(String str1,String str2){
        char[] c1=str1.toCharArray();
        char[] c2=str2.toCharArray();
        int length1=c1.length;
        int length2=c2.length;
        if(length1 != length2){
            return false;
        }

        for(int i=0;i<=length1-1;i++){
            if (Character.toLowerCase(c1[i]) == Character.toLowerCase(c2[i])
                    ||Character.toUpperCase(c1[i])==Character.toUpperCase(c2[i])) {
                continue;
            }
        }
        return true;
    }
}
